package com.woshua.mvpmodel.mvp.presenter;

import com.woshua.mvpmodel.mvp.model.GirlModel;
import com.woshua.mvpmodel.mvp.model.IGirlModel;
import com.woshua.mvpmodel.mvp.model.bean.GirlBean;
import com.woshua.mvpmodel.mvp.view.IGirlView;
import com.woshua.mvpmodel.ui.BasePresenter;

import java.util.List;

/*
* 中间桥梁
* */
public class GirlPresenter extends BasePresenter<IGirlView> {

    private IGirlModel model=new GirlModel();

    public void loadData()
    {
        getView().showLoading();

        model.loadData(new IGirlModel.IGirlResult() {
            @Override
            public void onComplete(List<GirlBean> girls) {
                getView().endLoading();

                getView().onResult(girls);
            }
        });
    }
}
